VERSION 5.00
Object = "{248DD890-BB45-11CF-9ABC-0080C7E7B78D}#1.0#0"; "MSWINSCK.OCX"
Begin VB.Form Form1 
   Caption         =   "Form1"
   ClientHeight    =   5190
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   10080
   LinkTopic       =   "Form1"
   ScaleHeight     =   5190
   ScaleWidth      =   10080
   StartUpPosition =   3  'Windows Default
   Begin VB.TextBox txtChannel 
      Height          =   285
      Left            =   240
      TabIndex        =   3
      Text            =   "Home Channel"
      Top             =   1800
      Width           =   1455
   End
   Begin VB.CommandButton JoinChannel 
      Caption         =   "Join Channel"
      Height          =   375
      Left            =   1800
      TabIndex        =   2
      Top             =   1800
      Width           =   1215
   End
   Begin VB.CommandButton CreateAccount 
      Caption         =   "create account"
      Height          =   495
      Left            =   120
      TabIndex        =   1
      Top             =   600
      Width           =   1095
   End
   Begin VB.CommandButton Connect 
      Caption         =   "Connect"
      Height          =   375
      Left            =   120
      TabIndex        =   0
      Top             =   120
      Width           =   1095
   End
   Begin MSWinsockLib.Winsock sckClient 
      Left            =   120
      Top             =   1200
      _ExtentX        =   741
      _ExtentY        =   741
      _Version        =   393216
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Private Sub Connect_Click()
    'Setup User information
    With UserInfo
        .Username = "Fallen"
        .Password = "radorado"
        .AdminPassword = "radorado"
        .Client = "TAHC"
        .Home = "Test Channel"
    End With
    
    'connect
   Call sckClient.Close
   Call sckClient.Connect("liquidstorm.sytes.net", 6112)
   'Call sckClient.Connect("10.1.1.2", 6112)
End Sub

Private Sub CreateAccount_Click()
    With Buf
        .InsertString "Fallen"   'username
        .InsertString "radorado" 'password
        .InsertString "radorado" 'confirm password
        .SendPacket sckClient, &HA2 'send packet
    End With
End Sub

Private Sub JoinChannel_Click()
            Buf.InsertString txtChannel
            Buf.SendPacket Form1.sckClient, &H1
End Sub

Private Sub sckClient_Connect()
    'Connected, Send login info
    With Buf
        .InsertString UserInfo.Username
        .InsertString UserInfo.Password
        .SendPacket Form1.sckClient, &HA1
    End With
End Sub

Private Sub sckClient_DataArrival(ByVal bytesTotal As Long)
    Dim Data As String
        With sckClient
             Call .GetData(Data)
             Call ParseData(Data)
             
        End With
End Sub
